:root {
    --primary: #2b6cb0;
    --primary-hover: #2c5282;
    --bg: #f7fafc;
    --text: #2d3748;
    --border: #e2e8f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.4;
    color: var(--text);
    background: white;
    padding: 0.5rem;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    margin: 1rem 0;
    color: var(--primary);
    font-size: clamp(1.3rem, 5vw, 2rem);
}

.form-section {
    background: var(--bg);
    border-radius: 10px;
    padding: 0.8rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0.5rem 0;
}

@media (min-width: 640px) {
    .input-group {
        flex-direction: row;
        align-items: center;
        margin: 0.8rem 0;
        gap: 1rem;
    }
}

label {
    font-weight: 500;
    flex: 0 0 100px;
    font-size: 0.85rem;
    color: #4a5568;
}

input, select {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    min-height: 42px;
    transition: all 0.2s;
}

input:focus, select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(43, 108, 176, 0.1);
}

button {
    background: var(--primary);
    color: white;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    width: 100%;
    margin-top: 0.8rem;
    font-size: 0.95rem;
}

@media (min-width: 640px) {
    button {
        width: auto;
        margin-left: auto;
        padding: 0.7rem 2rem;
    }
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.result-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1.5rem;
    display: none;
}

.result-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.result-item {
    margin: 0.8rem 0;
}

.progress-bar {
    height: 16px;
    background: var(--bg);
    border-radius: 8px;
    overflow: hidden;
    margin: 0.4rem 0;
}

.progress-fill {
    height: 100%;
    width: 0;
    transition: width 0.5s ease;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-secondary {
    background: #718096;
}

.btn-secondary:hover {
    background: #4a5568;
}

/* 移动端优化 */
@media (max-width: 640px) {
    .input-group {
        flex-direction: row !important;
        align-items: center;
        gap: 0.5rem;
        margin: 0.4rem 0;
    }

    label {
        flex: 0 0 80px;
        font-size: 0.75rem;
        white-space: nowrap;
    }

    input, select {
        min-height: 36px;
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .result-card {
        padding: 0.8rem;
    }
}

@media (max-width: 375px) {
    label {
        flex-basis: 70px;
        font-size: 0.7rem;
    }

    input, select {
        min-height: 34px;
        font-size: 0.75rem;
    }

    .input-group {
        margin: 0.3rem 0;
    }

    .button-group {
        flex-direction: column;
    }
}